package com.yumeko.springcloud.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @program: SpringCloud
 * @description:
 * @author: Zheng Hao
 * @create: 2020-03-07 05:53
 */
@RestController
@Slf4j
public class OrderController {
    @Resource
    private RestTemplate restTemplate;

    @GetMapping("/consumer/payment/zk")
    public ResponseEntity<String> paymentInfo() {
        return restTemplate.getForEntity("http://cloud-provider-service/payment/zk", String.class);
    }
}
